home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / doc / www-talk.archive.Z / www-talk.archive / text0156.txt < prev    next >
Encoding:
Text File  |  1992-11-30  |  3.9 KB  |  126 lines

  1. >>>>> On Wed, 24 Jun 92 12:15:52 CDT, Dan Connolly <connolly@pixel.convex.com> said:
  2.  
  3. >>But then this raises another issue: does WWW allow anchors within
  4. >>anchors?  I think not - in which case I could not use WWW anchors to
  5. >>both label a paragraph (e.g. for attaching an annotation) and a word
  6. >>within it (e.g. for definition).  This worries me quite a bit.  Nor
  7. >>can I attach multiple links to the same point (e.g. definitions of a
  8. >>word in multiple languages).
  9. >
  10. > This and other related questions (can I have lists within lists?)
  11. > are precisely the reason for using a well-defined structural markup
  12. > language governed by SGML processing rules.
  13.  
  14. > Right now we have no DTD for HTML, and the only answers lie in
  15. > the browser source code. The documentation "in the web" is too
  16. > vague. But I hardly think we want the browser source code to
  17. > be the definition of HTML.
  18.  
  19. The situation with anchors in SGML is even worse. In addition to the cases where
  20. you want to have anchors within lists, list items, headlines etc. and lists,
  21. list items, headlines etc. within anchors, you also have anchors within anchors.
  22. Actually, anchors within anchors look like this:
  23.  
  24. <BEGIN ANCHOR A>
  25. !
  26. !
  27. !   <BEGIN ANCHOR B>
  28. !   !
  29. !   !
  30. !   !
  31. !   <END ANCHOR B>
  32. !
  33. !
  34. <END ANCHOR A>
  35.  
  36. This case is trivial (you just allow anchors within anchors in the DTD).
  37. However, consider the case where you want to have a destination anchor marking,
  38. say, paragraphs 1 and 2, and another one marking 2 and 3:
  39.  
  40. <BEGIN ANCHOR A>
  41. !
  42. ! para 1
  43. !
  44. !   <BEGIN ANCHOR B>
  45. !                  !
  46. ! para 2           !
  47. !                  !
  48. <END ANCHOR A>     !
  49.                    !
  50.   para 3           !
  51.                    !
  52.     <END ANCHOR B>-+
  53.  
  54. This situation cannot be implemented with SGML Tags like <A ....>text</A>, as
  55. it is proposed in HTML. Also, I doubt that it is possible to construct an anchor
  56. spanning, e.g., a few items of list A and a few items of list B, because the
  57. SGML parser would implicitly close openened anchor tags when reaching </list>:
  58.  
  59. <list A>
  60.   <item>...
  61. <A .....>
  62.   <item>...
  63.   <item>...
  64. </list>
  65.  
  66. <list B>
  67.   <item>...
  68. </A>
  69.   <item>...
  70.   <item>...
  71. </list>
  72.  
  73. The reason why it is possible to construct such things using the NeXT-based WWW
  74. viewer/editor is simply that HTML is not SGML. Therefore it is impossible to
  75. specify a DTD for HTML (as Dan has already pointed out).
  76.  
  77. In our Hyper-G system that uses HTF, a SGML-based format similar to HTML, we
  78. overcome the anchor-nesting problem by specifying TWO tags for anchors: an
  79. anchor-start (<AS>) tag and an anchor-end (<AE>) tag with an additional ID
  80. attribute. So, the examples are coded like this:
  81.  
  82. <AS ID="A">
  83. para 1
  84. <AS ID="B">
  85. para 2
  86. <AE ID="A">
  87. para 3
  88. <AE ID="B">
  89.  
  90. and
  91.  
  92. <list A>
  93.   <item>...
  94. <AS ID="C">
  95.   <item>...
  96.   <item>...
  97. </list>
  98.  
  99. <list B>
  100.   <item>...
  101. <AE ID="C">
  102.   <item>...
  103.   <item>...
  104. </list>
  105.  
  106. which is perfectly legal in our DTD. I don't want to waste more internet
  107. bandwidth sending the DTD, but you may get it by anonymous ftp from
  108. iicm.tu-graz.ac.at in file pub/Hyper-G/sgml/hyper-g.dtd. There is also a
  109. corresponding style sheet as well as styles used to convert HTF to HTML and
  110. LateX with a stand-alone SGML parser. 
  111.  
  112. Let me say one final word about anchors: In my (and others) opinion, it is
  113. generally not a good idea to store anchors (or even links) in documents. This
  114. requires a modification of the document whenever an anchor is
  115. inserted/modified/deleted and is problematic in multi-user environments with
  116. private links, etc. Rather, the links should be stored and manipulated in a
  117. seperate link database (like in Intermedia and also in Hyper-G). This also
  118. allows for backwards-tracing of links, which is essential for maintaining the
  119. integrity of the hypertext and providing a graphical overview of the hypertext
  120. to the users.
  121.  
  122. However, in certain circumstances (like document modification) it is convenient
  123. to supply the anchor information with the document. That is the reason why it's
  124. in the DTD.
  125.  
  126.